package com.aline.seo.controller;

import com.aline.seo.entity.Role;
import com.aline.seo.repository.RoleRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName RoleController
 * @Description
 * @Author 孟志浩
 * @Date 2019/4/11 15:30
 **/
@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private RoleRepository repository;

    @GetMapping()
    public Object listRole(){
        return repository.findAll();
    }

}
